package com.hw.paltfrom.controller.system;

import java.util.Map;

/**
 *角色信息
 * 曹荣坤
 * 2019年11月6日15:06:04
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hw.paltfrom.pack.ResponseResult;
import com.hw.paltfrom.rescode.HWSystemCode;
import com.hw.paltfrom.service.system.BaseRoleServer;
import com.hw.paltfrom.utils.VerifyUtil;
import com.hw.paltfrom.vo.BaseRoleVo;

@RestController
@RequestMapping(value = "/BaseRole")
public class BaseRoleController {
	@Autowired
	private BaseRoleServer baseRoleServer;
	
	@RequestMapping(value = "/query")
	public Map<String, Object> Query(BaseRoleVo vo) {
		Boolean flag = VerifyUtil.verifyParams(vo);
		if (!flag) {
			return ResponseResult.fail(HWSystemCode.PARAMS_ERROR);
		}
		return baseRoleServer.queryAllList(vo);

	}

	@RequestMapping(value = "/insert")
	public Map<String, Object> insert(BaseRoleVo vo) {
		Boolean flag = VerifyUtil.verifyParams(vo);
		if (!flag) {
			return ResponseResult.fail(HWSystemCode.PARAMS_ERROR);
		}
		return baseRoleServer.insert(vo);
	}

//	删除fDeletemark传1  更新传0
	@RequestMapping(value = "/update")
	public Map<String, Object> update(BaseRoleVo vo) {
		Boolean flag = VerifyUtil.verifyParams(vo);
		if (!flag) {
			return ResponseResult.fail(HWSystemCode.PARAMS_ERROR);
		}
		return baseRoleServer.update(vo);

	}
	

}
